import { Module } from '@nestjs/common';
import { MpAuthModule } from './auth/auth.module';
import { WxModule } from './wx/wx.module';
import { MiniappBannerModule } from './miniapp-banner/miniapp-banner.module';
import { TenantModule } from '../tenant/tenant.module';
import { MiniappMissionModule } from './miniapp-mission/miniapp-mission.module';
import { MiniappArticleModule } from './miniapp-article/miniapp-article.module';
import { MiniappPointsModule } from './miniapp-points/miniapp-points.module';
import { MiniappService } from './miniapp.service';
import { MiniappController } from './miniapp.controller';
import { UserModule } from '../user/user.module';
import { RouterModule } from '@nestjs/core';
import { MiniappSurveyModule } from './miniapp-survey/miniapp-survey.module';
import { MiniappCategoryModule } from './miniapp-category/miniapp-category.module';
import { MiniappCatalogModule } from './miniapp-catalog/miniapp-catalog.module';
import { MiniappKnowledgeModule } from './miniapp-knowledge/miniapp-knowledge.module';
import { MiniappWeatherModule } from './miniapp-weather/miniapp-weather.module';
import { CategoryDiseaseModule } from '../category-disease/category-disease.module';
import { MiniappLogModule } from './log/log.module';
import { MiniappFeedbackModule } from './miniapp-feedback/miniapp-feedback.module';

const modules = [
  MiniappPointsModule,
  MiniappArticleModule,
  MiniappMissionModule,
  WxModule,
  MpAuthModule,
  MiniappBannerModule,
  MiniappSurveyModule,
  MiniappCategoryModule,
  MiniappCatalogModule,
  MiniappKnowledgeModule,
	MiniappWeatherModule,
	MiniappLogModule,
	MiniappFeedbackModule
];

@Module({
  imports: [
    ...modules,
    RouterModule.register([
      {
        path: 'mp',
        module: MiniappModule,
        children: [...modules],
      },
    ]),
		CategoryDiseaseModule,
    TenantModule,
    UserModule,
  ],
  controllers: [MiniappController],
  providers: [MiniappService],
  exports: [MiniappService],
})
export class MiniappModule {}
